<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/Public/css/pintuer.css">
<link rel="stylesheet" href="/Public/css/admin.css">
<script src="/Public/js/jquery.js"></script>
<script src="/Public/js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder">会员积分流水明细</strong></div>
  <div class="padding border-bottom">
  </div>
  <table class="table table-hover text-center">
    <tr>
        <th width="15%" style="text-align:left; padding-left:20px;">id</th>
        <th width="15%">会员电话</th>
        <th width="15%">本次流动积分</th>
        <th width="15%">积分流动原因</th>
        <th width="15%">时间</th>
        <th width="15%">来源对象</th>
      </tr>
      <?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
            <td style="text-align:left; padding-left:20px;">
                <?php echo ($k); ?>
            </td>
            <td><?php echo ($phone); ?></td>
            <td><?php echo ($vo["points"]); ?></td>
            <td>
              <?php
 if($vo['is_dl'] == '0' && $vo['is_tj'] == '1'){ echo '下级消费，'; }elseif($vo['is_dl'] == '1' && $vo['is_tj'] == '0'){ echo '本人代理商，'; }elseif($vo['is_dl'] == '0' && $vo['is_tj'] == '0'){ echo ' '; } ?>
            <?php echo ($vo["reason"]); ?></td>
            <td><?php echo ($vo["shijian"]); ?></td>
            <td>
                <?php
 if($vo['shop_id']){ $mysql_server_name='127.0.0.1'; $mysql_username='root'; $mysql_password='cdzx123321'; $mysql_database='cdzx'; $conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; mysql_query("set names 'utf8'"); mysql_select_db($mysql_database); $sql ="select * from shop where shop_id = ".$vo['shop_id']; $result = mysql_query($sql,$conn); $row = mysql_fetch_array($result); echo $row['phone']; }else{ echo ''; } ?>
            </td>
          </tr><?php endforeach; endif; else: echo "" ;endif; ?>
         
      <tr>
        <td colspan="8"><div class="pagelist"> <?php echo ($page); ?> </div></td>
      </tr>
    
  </table>
</div>


</body>
</html>